package com.csair.platform.cit.service.dao.a200000;

import com.csair.platform.jpa.dao.PlatformBaseRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.csair.platform.cit.service.entity.CitWgqyGrid;


@Repository
public interface CitWgqyGridRepository  extends PlatformBaseRepository<CitWgqyGrid,Long> {

    /**
     * 根据税号和时间删除数据
     * @param nsrsbh 纳税人识别号
     * @param skssqq 税款所属日期起
     * @param skssqz 税款所属日期止
     */
    public void deleteByNsrsbhAndSkssqqAndSkssqz(String nsrsbh,String skssqq,String skssqz);

    /**
     * 根据税号和时间查询数据
     * @param nsrsbh 纳税人识别号
     * @param skssqq 税款所属日期起
     * @param skssqz 税款所属日期止
     * @return 集合
     */
    public Page<CitWgqyGrid> queryByNsrsbhAndSkssqqAndSkssqzOrderByCreateTime(String nsrsbh, String skssqq, String skssqz,Pageable pageable);

    /**
     * 根据id查询数据
     * @param id 主键id
     * @return
     */
    public CitWgqyGrid queryById(Long id);

    @Transactional
    @Modifying
    @Query("delete CitWgqyGrid where id in (:ids) ")
    int deleteByIds(@Param("ids") List<Long> ids);
}
